mod rpc;
mod named;

mod all {
    pub use crate::rpc::*;
    pub use crate::named::*;
}

pub use crate::named::Named;

pub enum ServiceProbeStatus {
    Start(String),
    Stop(String),
}

pub trait ServiceProbe {
    fn report_status(&self, status: ServiceProbeStatus);
}

#[async_trait::async_trait]
pub trait Service<N, MQ> {
    async fn serve(&mut self, node: &N, message_queue: MQ) -> tokio::io::Result<()>;
}